I have a wpf radtreeview, now I can use left click to select item,
but i want to the selection behavior to be changed to double click, how could I achieve that?
Hi
I have the following datatemplate:
<DataTemplate
x:Key="ReportComponentTemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding Included}" Margin="5,0"/>
<TextBlock
Grid.Column="1" Text="{Binding Didascalia}" HorizontalAlignment="Stretch"
TextWrapping="Wrap"/>
<t:RadComboBox Grid.Row="1" Grid.ColumnSpan="2"
Width="150"
Visibility="{Binding DataContext.TemplatePath,
RelativeSource={RelativeSource AncestorType=local:TreeViewReportControl},
Converter={StaticResource StringEmptyToHide}}"
VerticalAlignment="Top" Margin="5,0"
HorizontalAlignment="Left"
ItemsSource="{Binding TagsDisponibili}"
SelectedItem="{Binding TagSelezionato, NotifyOnTargetUpdated=True, Mode=TwoWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding DataContext.TagSelezionatoUpdatedCommand
, RelativeSource={RelativeSource AncestorType=local:TreeViewReportControl}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</t:RadComboBox>
</Grid>
</DataTemplate>
<t:RadDocking>
<t:RadSplitContainer MaxWidth="600" t:DockingPanel.InitialSize="400,150" Name="LeftContainer" InitialPosition="DockedLeft">
<t:RadPaneGroup>
<t:RadPane>
<Grid>
<t:RadBusyIndicator>
<t:RadTreeView>
</t:RadTreeView>
</t:RadBusyIndicator>
</Grid>
</t:RadPane>
</t:RadPaneGroup>
</t:RadSplitContainer>
</t:RadDocking>
I've read this thread but it is a bit confusing and old: Live sorting/grouping in UI for WPF | Telerik Forums
What is the current situation?
I am having problems with Devexpress GridControl as they dont support what they call "Live Data Shaping" eg sorting with real-time updates IF you use WPF binding.
Question - can Telerik data grid and/or virtual grid do live data shaping where columns use custom templates with WPF binding to a dictionary. For example: `{Binding Fields[abc].Value}`?
Hi,
I used the documentation to create a tree view with Windows folders. I wish to expand the item from from a specified path, e.g.. I want to have expanded Documents folder from the beginning, but I did not find anything that works.
Thanks!
Hello,
I am using a RadTreeView component in a WPF application that looks like in the following photo. The hierarchy is: a Category can contain a list of SubCategories and a SubCategory contains a List of Activities that have some properties. I would like to transform my RadTreeView into a RadTreeListView or RadGridVew in order to beneficiate from SelectionUnit property and the navigation between cells from the keyboard but I could not find anything that meets by needs:
a component with cells only on the last level of the hierarchy, to be able to select a cell and edit it and, if possible, to have a tabular header with details from the last level of the hirarchy.
Thank you!
Currently I'm using a ProjectItem classes and FileItem classes into a RadTreeView for displaying the ProjectItem content. And when I'm trying to handle the Edited event, there occurs a problem with Old and New value, in case that given objects to RadTreeView.ItemsSource will be a reference type, it might create a problem.
I would like to handle the Edited event for checking the NewValue, and according to conditions return there a OldValue.
Hi,
I am using <telerik:RadTreeListView> and the scroll functionality does not work. this is how my code looks like:
<UserControl x:Class="WISN.Windows.Survey.FacilityStaffControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:WISN.Windows.Survey.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<telerik:RadTreeListView x:Name="stufftreeListView" AutoGenerateColumns="False"
AutoExpandItems="True" GroupRenderMode="Flat" CanUserDeleteRows="False"
ItemsSource="{Binding AllStaffByType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged }">
<telerik:RadTreeListView.ChildTableDefinitions>
<telerik:TreeListViewTableDefinition ItemsSource="{Binding StaffCategories,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></telerik:TreeListViewTableDefinition>
</telerik:RadTreeListView.ChildTableDefinitions>
<telerik:RadTreeListView.Columns>
<telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsSelected}" AutoSelectOnEdit="True" EditTriggers="CellClick">
<telerik:EventToCommandBehavior.EventBindings>
<telerik:EventBinding Command="{Binding CustomCommandCommand}" EventName="MouseLeftButtonDown" />
</telerik:EventToCommandBehavior.EventBindings>
</telerik:GridViewCheckBoxColumn>
<telerik:GridViewDataColumn IsReadOnly="True" DataMemberBinding="{Binding Name}" Header="Stuff"></telerik:GridViewDataColumn>
<telerik:GridViewDataColumn DataMemberBinding="{Binding AnnualSalary}" Header="Annual Salary"></telerik:GridViewDataColumn>
</telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>
</UserControl>
I really do not know how to fix it.
Thanks
I just started WPF trial. I need help though. I am going to have large grids (10Ks rows x 100 columns) with frequent update of certain cells (100s upd/sec).
I am not sure I can use your virtual grid - need more time to understand what are the drawbacks.
So I use RadGridView (see below - this is not final version - just a first try - what I quickly read in your article on making grid more performant).
Columns are made in C# and bound to dictionaries using string key like: `Binding("f[NAME].Value")` where `Value` is of type object (this is best I can do - dont ask - a requirement i cannot circumvent)
Now, what is my question here - when I load grid with data initially - most of the values in cells arent available yet. I am asked to display something to highlight that state. Also sometime some rows might get unavailable in the middle of use. But bottom line - these "unavailable" cues are going to live may be 0.5% of the grid life-time..
I dont want to write cell templates that will lengthen the visual tree and make grid slow for something that i need for very short period of time..
Is there a way to optimise it?
One theory - add something to the visual tree in the beginning and then take it away.. (like walking visual tree manually and inserting a semi-transparent red border or something like that? or changing template of rows, that have became available, into lightweight ones). Concern here - binding might get broken after manipulation with visual tree..
Or I can set all the values to a string like "N/A". However concern here is that what happens with the columns types in this case? Wont this screw the grid ability to sort/filter - because columns will pick up initial "string" type and later, when I change it to real data, (can be date/number/etc) - they break down completely.
Can I set columns type explicitely after N/A disappeared (however not clear - N/A might stay in some rows longer than in others and few could be N/A for lot longer)...
Any trick you can recommend?
NOTE: the same question applies on tree view (even more so)
<telerik:RadGridView x:Name="dg" ItemsSource="{Binding data}"
ValidatesOnDataErrors="InEditMode" IsPropertyChangedAggregationEnabled="False"
GroupRenderMode="Flat" ShowGroupPanel="False"AutoGenerateColumns="False"CanUserFreezeColumns="False"RowIndicatorVisibility="Collapsed"CanUserResizeColumns="False">
How to disable or overwrite background brush for selection in the TreeView?
What kind of templates I will be need to rewrite? Cause there's template for RadTreeViewItem but I cannot reach this brush.